QuickOPC User's Guide and Reference
Opaque data
Extensions > Integrated Extensions > OPC UA Complex Data Extension > Generic data and data types > Working with generic data > Generic data kinds > Opaque data

The opaque data is data whose concrete representation is hidden from its users. It is represented by an instance of the OpaqueData Class. Internally, it keeps the actual data in a System.Collections.BitArray object. The size is given in bits (you can obtained in by getting the value of the SizeInBits Property).

The data is accessible through the Value Property. If you would rather access the data as a regular array of bytes rather than a bit array, you can get the ByteArray Property to do so. If you want to set the whole byte array to a value of your own, use the SetByteArrayValue Method; this is not a property setter because it also requires the size in bits (which does not have to represent a whole number of bytes) be specified.

Note, however, that the two representations (the bit array and the byte array) are not internally synchronized. Setting a bit or byte in one of them does not set the other. Assigning a wholly new value to one of them causes the other be later re-created with a copy of the source data.

See Also

Recommended